package me.wangshier.cassandra.taco.data;

import me.wangshier.cassandra.taco.tacos.TacoOrder;
import org.springframework.data.repository.CrudRepository;

import java.util.Date;
import java.util.List;

/**
 * @Author: tongqianwen
 * @Date: 2024/12/12
 */
public interface OrderRepository extends CrudRepository<TacoOrder, Long> {
    List<TacoOrder> findByDeliveryZip(String deliveryZip);

    List<TacoOrder> readOrdersByDeliveryZipAndPlacedAtBetween(String deliveryZip, Date startDate, Date endDate);

//    List<TacoOrder> findByDeliveryToAndDeliveryCityAllIgnoresCase(String deliveryTo, String deliveryCity);

//    List<TacoOrder> findByDeliveryCityOrderByDeliveryTo(String city);

//    @Query("Order o where o.deliveryCity = 'Seattle'")
//    List<TacoOrder> readOrdersDeliveredInSeattle();
}
